package com.springStudy.boot.redis.seconedDemo;


import com.springStudy.boot.redis.seconedDemo.jedis.TestDemo1;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;

@SpringBootApplication(scanBasePackages = "com.springStudy.boot.redis.seconedDemo")
public class SeconedDemoApp {
    private static ApplicationContext applicationContext;

    private final static Log log = LogFactory.getLog("/");


//    private static TestDemo1 testDemo1;

    //100个线程同时请求redis
    public static void main(String[] args) {
        applicationContext =  SpringApplication.run(SeconedDemoApp.class,args);
        System.out.println("started");
        String[] beans = applicationContext
                .getBeanDefinitionNames();
//        for (String beanName : beans) {
//            Class<?> beanType = applicationContext
//                    .getType(beanName);
//            System.out.println("BeanName:" + beanName);
////            System.out.println("Bean的类型：" + beanType);
//            System.out.println("Bean所在的包：" + beanType.getPackage());
////            System.out.println("Bean：" + SpringContextHolder.getApplicationContext().getBean(
////                    beanName));
//        }

//        LogFactory.getLog(JedisConnectionFactory.class).isDebugEnabled()
        TestDemo1.test02();

    }


}
